﻿using System;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x0200029C RID: 668
	public class TConstraintList : TParseTreeNodeList
	{
		// Token: 0x060015CA RID: 5578 RVA: 0x00326759 File Offset: 0x00324959
		public virtual void addConstraint(TConstraint def)
		{
			base.addElement(def);
		}

		// Token: 0x1700041F RID: 1055
		public TConstraint this[int pos]
		{
			get
			{
				if (pos < 0 || pos >= base.size())
				{
					throw new IndexOutOfRangeException();
				}
				return (TConstraint)this.elementAt(pos);
			}
		}

		// Token: 0x060015CC RID: 5580 RVA: 0x00326783 File Offset: 0x00324983
		public virtual TConstraint getConstraint(int position)
		{
			if (position < base.size())
			{
				return (TConstraint)this.elementAt(position);
			}
			return null;
		}

		// Token: 0x060015CD RID: 5581 RVA: 0x0032679C File Offset: 0x0032499C
		public void removeConstraint(int index)
		{
			if (index >= 0 && index < base.size())
			{
				this.getConstraint(index).setChanged();
				base.removeElementAt(index);
			}
		}

		// Token: 0x060015CE RID: 5582 RVA: 0x003267BE File Offset: 0x003249BE
		internal override void addParseTreeNode(object arg1)
		{
			this.addConstraint((TConstraint)arg1);
		}

		// Token: 0x060015CF RID: 5583 RVA: 0x003267CC File Offset: 0x003249CC
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x060015D0 RID: 5584 RVA: 0x003267DC File Offset: 0x003249DC
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			for (int i = 0; i < base.size(); i++)
			{
				this.getConstraint(i).acceptChildren(v);
			}
			v.postVisit(this);
		}
	}
}
